<?php

namespace App\Services;

use App\Models\ExamCategory;

class ExamCategoryService extends BaseService
{
    /**
     * 获取列表
     * @return
     */
    public function list($page,$limit,$sort,$order,$name) {
        $query = ExamCategory::query();
        if(!empty($name)){
            $query->where('name','like',"%$name%");
        }
        return $query->orderBy($sort,$order)->paginate($limit, ['*'], 'page', $page);
    }
}
